public class Point <T>{
    private T x;
    private T y;

    public T getX() {
        return x;
    }

    public void setX(T x) {
        this.x = x;
    }

    public T getY() {
        return y;
    }

    public void setY(T y) {
        this.y = y;
    }

    public static void main(String[] args) {
        Point<Integer> p = new Point<>();
        p.setX(10);
        p.setY(20);
        System.out.println("x = " + p.x + "," + "y = " + p.y);
    }

}
